package com.ruoyi.walmart.mapper.order;

import com.ruoyi.walmart.domain.order.OrderItem;
import com.ruoyi.walmart.domain.QuerySummary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface OrderItemMapper {

    /** 添加 */
    int insertAll(List<OrderItem> orderItemList);

    /** 删除 */
    int deleteItem(List<String> customerOrderIds);

    /** 查询产品,数量,状态,sku */
    List<OrderItem> selectAllByCustomerOrderId(@Param("customerOrderId") String customerOrderId,@Param("authId") Long authId,@Param("purchaseOrderId") String purchaseOrderId);
    /**
     * 汇总订单列表
     * @return
     */
    QuerySummary getOrderSummary(QuerySummary orderSummary);
    /** 更新订单明细状态 */
    int updateOrderStatusBatch(List<OrderItem> orderItemList);
    /** 查询是否存在对应的walmarItems */
    List<String> findExistingItemPurchaseOrderIds(@Param("list") List<String> purchaseOrderIds);
}
